package com.example.sharesinfo.view;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.view.WindowManager;

/**
 * @author
 * @type
 * @explain 自定义Dialog
 * @creat time
 */
public class DialogView extends Dialog {
    public DialogView(Context context, int layoutId, int themeResId, int gravity) {
        super(context, themeResId);
        setContentView(layoutId);
        Window window = getWindow();
        WindowManager.LayoutParams layoutParams = window.getAttributes();
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
        layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
        layoutParams.gravity = gravity;
        window.setAttributes(layoutParams);

    }
}
